<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>TransformerUtils (Apache Commons Collections 4.0 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="TransformerUtils (Apache Commons Collections 4.0 API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/TransformerUtils.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/commons/collections4/Trie.html" title="interface in org.apache.commons.collections4"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/commons/collections4/TransformerUtils.html" target="_top">Frames</a></li>
<li><a href="TransformerUtils.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.collections4</div>
<h2 title="Class TransformerUtils" class="title">Class TransformerUtils</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.commons.collections4.TransformerUtils</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">TransformerUtils</span>
extends <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block"><code>TransformerUtils</code> provides reference implementations and
 utilities for the Transformer functor interface. The supplied transformers are:
 <ul>
 <li>Invoker - returns the result of a method call on the input object
 <li>Clone - returns a clone of the input object
 <li>Constant - always returns the same object
 <li>Closure - performs a Closure and returns the input object
 <li>Predicate - returns the result of the predicate as a Boolean
 <li>Factory - returns a new object from a factory
 <li>Chained - chains two or more transformers together
 <li>Switch - calls one transformer based on one or more predicates
 <li>SwitchMap - calls one transformer looked up from a Map
 <li>Instantiate - the Class input object is instantiated
 <li>Map - returns an object from a supplied Map
 <li>Null - always returns null
 <li>NOP - returns the input object, which should be immutable
 <li>Exception - always throws an exception
 <li>StringValue - returns a <code>java.lang.String</code> representation of the input object
 </ul>
 All the supplied transformers are Serializable.</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>3.0</dd>
<dt><span class="strong">Version:</span></dt>
  <dd>$Id: TransformerUtils.java 1479347 2013-05-05 16:01:15Z tn $</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;T,T&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#asTransformer(org.apache.commons.collections4.Closure)">asTransformer</a></strong>(<a href="../../../../org/apache/commons/collections4/Closure.html" title="interface in org.apache.commons.collections4">Closure</a>&lt;? super T&gt;&nbsp;closure)</code>
<div class="block">Creates a Transformer that calls a Closure each time the transformer is used.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#asTransformer(org.apache.commons.collections4.Factory)">asTransformer</a></strong>(<a href="../../../../org/apache/commons/collections4/Factory.html" title="interface in org.apache.commons.collections4">Factory</a>&lt;? extends O&gt;&nbsp;factory)</code>
<div class="block">Creates a Transformer that calls a Factory each time the transformer is used.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;T,<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#asTransformer(org.apache.commons.collections4.Predicate)">asTransformer</a></strong>(<a href="../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super T&gt;&nbsp;predicate)</code>
<div class="block">Creates a Transformer that calls a Predicate each time the transformer is used.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;T,T&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#chainedTransformer(java.util.Collection)">chainedTransformer</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;? extends <a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;T,T&gt;&gt;&nbsp;transformers)</code>
<div class="block">Create a new Transformer that calls each transformer in turn, passing the
 result into the next transformer.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;T,T&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#chainedTransformer(org.apache.commons.collections4.Transformer...)">chainedTransformer</a></strong>(<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;? super T,? extends T&gt;...&nbsp;transformers)</code>
<div class="block">Create a new Transformer that calls each transformer in turn, passing the
 result into the next transformer.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;T,T&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#cloneTransformer()">cloneTransformer</a></strong>()</code>
<div class="block">Gets a transformer that returns a clone of the input
 object.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#constantTransformer(O)">constantTransformer</a></strong>(O&nbsp;constantToReturn)</code>
<div class="block">Creates a Transformer that will return the same object each time the
 transformer is used.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#exceptionTransformer()">exceptionTransformer</a></strong>()</code>
<div class="block">Gets a transformer that always throws an exception.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends T&gt;,T&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#instantiateTransformer()">instantiateTransformer</a></strong>()</code>
<div class="block">Gets a Transformer that expects an input Class object that it will instantiate.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends T&gt;,T&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#instantiateTransformer(java.lang.Class[], java.lang.Object[])">instantiateTransformer</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;[]&nbsp;paramTypes,
                      <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[]&nbsp;args)</code>
<div class="block">Creates a Transformer that expects an input Class object that it will
 instantiate.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#invokerTransformer(java.lang.String)">invokerTransformer</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;methodName)</code>
<div class="block">Gets a Transformer that invokes a method on the input object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#invokerTransformer(java.lang.String, java.lang.Class[], java.lang.Object[])">invokerTransformer</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;methodName,
                  <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;[]&nbsp;paramTypes,
                  <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[]&nbsp;args)</code>
<div class="block">Gets a Transformer that invokes a method on the input object.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#mapTransformer(java.util.Map)">mapTransformer</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;? super I,? extends O&gt;&nbsp;map)</code>
<div class="block">Creates a Transformer that uses the passed in Map to transform the input
 object (as a simple lookup).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;T,T&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#nopTransformer()">nopTransformer</a></strong>()</code>
<div class="block">Gets a transformer that returns the input object.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#nullTransformer()">nullTransformer</a></strong>()</code>
<div class="block">Gets a transformer that always returns null.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;T,<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#stringValueTransformer()">stringValueTransformer</a></strong>()</code>
<div class="block">Gets a transformer that returns a <code>java.lang.String</code>
 representation of the input object.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#switchMapTransformer(java.util.Map)">switchMapTransformer</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;I,<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;&gt;&nbsp;objectsAndTransformers)</code>
<div class="block">Create a new Transformer that uses the input object as a key to find the
 transformer to call.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#switchTransformer(java.util.Map)">switchTransformer</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;I&gt;,<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;&gt;&nbsp;predicatesAndTransformers)</code>
<div class="block">Create a new Transformer that calls one of the transformers depending
 on the predicates.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#switchTransformer(org.apache.commons.collections4.Predicate[], org.apache.commons.collections4.Transformer[])">switchTransformer</a></strong>(<a href="../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super I&gt;[]&nbsp;predicates,
                 <a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;? super I,? extends O&gt;[]&nbsp;transformers)</code>
<div class="block">Create a new Transformer that calls one of the transformers depending
 on the predicates.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#switchTransformer(org.apache.commons.collections4.Predicate[], org.apache.commons.collections4.Transformer[], org.apache.commons.collections4.Transformer)">switchTransformer</a></strong>(<a href="../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super I&gt;[]&nbsp;predicates,
                 <a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;? super I,? extends O&gt;[]&nbsp;transformers,
                 <a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;? super I,? extends O&gt;&nbsp;defaultTransformer)</code>
<div class="block">Create a new Transformer that calls one of the transformers depending
 on the predicates.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/TransformerUtils.html#switchTransformer(org.apache.commons.collections4.Predicate, org.apache.commons.collections4.Transformer, org.apache.commons.collections4.Transformer)">switchTransformer</a></strong>(<a href="../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super I&gt;&nbsp;predicate,
                 <a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;? super I,? extends O&gt;&nbsp;trueTransformer,
                 <a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;? super I,? extends O&gt;&nbsp;falseTransformer)</code>
<div class="block">Create a new Transformer that calls one of two transformers depending
 on the specified predicate.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="exceptionTransformer()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>exceptionTransformer</h4>
<pre>public static&nbsp;&lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;&nbsp;exceptionTransformer()</pre>
<div class="block">Gets a transformer that always throws an exception.
 This could be useful during testing as a placeholder.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>I</code> - the input type</dd><dd><code>O</code> - the output type</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/ExceptionTransformer.html" title="class in org.apache.commons.collections4.functors"><code>ExceptionTransformer</code></a></dd></dl>
</li>
</ul>
<a name="nullTransformer()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nullTransformer</h4>
<pre>public static&nbsp;&lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;&nbsp;nullTransformer()</pre>
<div class="block">Gets a transformer that always returns null.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>I</code> - the input type</dd><dd><code>O</code> - the output type</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/ConstantTransformer.html" title="class in org.apache.commons.collections4.functors"><code>ConstantTransformer</code></a></dd></dl>
</li>
</ul>
<a name="nopTransformer()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nopTransformer</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;T,T&gt;&nbsp;nopTransformer()</pre>
<div class="block">Gets a transformer that returns the input object.
 The input object should be immutable to maintain the
 contract of Transformer (although this is not checked).</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - the input/output type</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/NOPTransformer.html" title="class in org.apache.commons.collections4.functors"><code>NOPTransformer</code></a></dd></dl>
</li>
</ul>
<a name="cloneTransformer()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cloneTransformer</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;T,T&gt;&nbsp;cloneTransformer()</pre>
<div class="block">Gets a transformer that returns a clone of the input
 object. The input object will be cloned using one of these
 techniques (in order):
 <ul>
 <li>public clone method
 <li>public copy constructor
 <li>serialization clone
 <ul></div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - the input/output type</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/CloneTransformer.html" title="class in org.apache.commons.collections4.functors"><code>CloneTransformer</code></a></dd></dl>
</li>
</ul>
<a name="constantTransformer(java.lang.Object)">
<!--   -->
</a><a name="constantTransformer(O)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>constantTransformer</h4>
<pre>public static&nbsp;&lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;&nbsp;constantTransformer(O&nbsp;constantToReturn)</pre>
<div class="block">Creates a Transformer that will return the same object each time the
 transformer is used.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>I</code> - the input type</dd><dd><code>O</code> - the output type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>constantToReturn</code> - the constant object to return each time in the transformer</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/ConstantTransformer.html" title="class in org.apache.commons.collections4.functors"><code>ConstantTransformer</code></a></dd></dl>
</li>
</ul>
<a name="asTransformer(org.apache.commons.collections4.Closure)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>asTransformer</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;T,T&gt;&nbsp;asTransformer(<a href="../../../../org/apache/commons/collections4/Closure.html" title="interface in org.apache.commons.collections4">Closure</a>&lt;? super T&gt;&nbsp;closure)</pre>
<div class="block">Creates a Transformer that calls a Closure each time the transformer is used.
 The transformer returns the input object.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - the input/output type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>closure</code> - the closure to run each time in the transformer, not null</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the closure is null</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/ClosureTransformer.html" title="class in org.apache.commons.collections4.functors"><code>ClosureTransformer</code></a></dd></dl>
</li>
</ul>
<a name="asTransformer(org.apache.commons.collections4.Predicate)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>asTransformer</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;T,<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a>&gt;&nbsp;asTransformer(<a href="../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super T&gt;&nbsp;predicate)</pre>
<div class="block">Creates a Transformer that calls a Predicate each time the transformer is used.
 The transformer will return either Boolean.TRUE or Boolean.FALSE.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - the input type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>predicate</code> - the predicate to run each time in the transformer, not null</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the predicate is null</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/PredicateTransformer.html" title="class in org.apache.commons.collections4.functors"><code>PredicateTransformer</code></a></dd></dl>
</li>
</ul>
<a name="asTransformer(org.apache.commons.collections4.Factory)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>asTransformer</h4>
<pre>public static&nbsp;&lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;&nbsp;asTransformer(<a href="../../../../org/apache/commons/collections4/Factory.html" title="interface in org.apache.commons.collections4">Factory</a>&lt;? extends O&gt;&nbsp;factory)</pre>
<div class="block">Creates a Transformer that calls a Factory each time the transformer is used.
 The transformer will return the value returned by the factory.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>I</code> - the input type</dd><dd><code>O</code> - the output type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>factory</code> - the factory to run each time in the transformer, not null</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the factory is null</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/FactoryTransformer.html" title="class in org.apache.commons.collections4.functors"><code>FactoryTransformer</code></a></dd></dl>
</li>
</ul>
<a name="chainedTransformer(org.apache.commons.collections4.Transformer...)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>chainedTransformer</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;T,T&gt;&nbsp;chainedTransformer(<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;? super T,? extends T&gt;...&nbsp;transformers)</pre>
<div class="block">Create a new Transformer that calls each transformer in turn, passing the
 result into the next transformer.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - the input/output type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>transformers</code> - an array of transformers to chain</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the transformers array or any of the transformers is null</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/ChainedTransformer.html" title="class in org.apache.commons.collections4.functors"><code>ChainedTransformer</code></a></dd></dl>
</li>
</ul>
<a name="chainedTransformer(java.util.Collection)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>chainedTransformer</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;T,T&gt;&nbsp;chainedTransformer(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;? extends <a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;T,T&gt;&gt;&nbsp;transformers)</pre>
<div class="block">Create a new Transformer that calls each transformer in turn, passing the
 result into the next transformer. The ordering is that of the iterator()
 method on the collection.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - the input/output type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>transformers</code> - a collection of transformers to chain</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the transformers collection or any of the transformers is null</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/ChainedTransformer.html" title="class in org.apache.commons.collections4.functors"><code>ChainedTransformer</code></a></dd></dl>
</li>
</ul>
<a name="switchTransformer(org.apache.commons.collections4.Predicate, org.apache.commons.collections4.Transformer, org.apache.commons.collections4.Transformer)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>switchTransformer</h4>
<pre>public static&nbsp;&lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;&nbsp;switchTransformer(<a href="../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super I&gt;&nbsp;predicate,
                                       <a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;? super I,? extends O&gt;&nbsp;trueTransformer,
                                       <a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;? super I,? extends O&gt;&nbsp;falseTransformer)</pre>
<div class="block">Create a new Transformer that calls one of two transformers depending
 on the specified predicate.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>I</code> - the input type</dd><dd><code>O</code> - the output type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>predicate</code> - the predicate to switch on</dd><dd><code>trueTransformer</code> - the transformer called if the predicate is true</dd><dd><code>falseTransformer</code> - the transformer called if the predicate is false</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if either the predicate or transformer is null</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/SwitchTransformer.html" title="class in org.apache.commons.collections4.functors"><code>SwitchTransformer</code></a></dd></dl>
</li>
</ul>
<a name="switchTransformer(org.apache.commons.collections4.Predicate[], org.apache.commons.collections4.Transformer[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>switchTransformer</h4>
<pre>public static&nbsp;&lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;&nbsp;switchTransformer(<a href="../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super I&gt;[]&nbsp;predicates,
                                       <a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;? super I,? extends O&gt;[]&nbsp;transformers)</pre>
<div class="block">Create a new Transformer that calls one of the transformers depending
 on the predicates. The transformer at array location 0 is called if the
 predicate at array location 0 returned true. Each predicate is evaluated
 until one returns true. If no predicates evaluate to true, null is returned.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>I</code> - the input type</dd><dd><code>O</code> - the output type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>predicates</code> - an array of predicates to check</dd><dd><code>transformers</code> - an array of transformers to call</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the either array is null or empty</dd>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if any element in the arrays is null</dd>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the arrays are different sizes</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/SwitchTransformer.html" title="class in org.apache.commons.collections4.functors"><code>SwitchTransformer</code></a></dd></dl>
</li>
</ul>
<a name="switchTransformer(org.apache.commons.collections4.Predicate[], org.apache.commons.collections4.Transformer[], org.apache.commons.collections4.Transformer)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>switchTransformer</h4>
<pre>public static&nbsp;&lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;&nbsp;switchTransformer(<a href="../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super I&gt;[]&nbsp;predicates,
                                       <a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;? super I,? extends O&gt;[]&nbsp;transformers,
                                       <a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;? super I,? extends O&gt;&nbsp;defaultTransformer)</pre>
<div class="block">Create a new Transformer that calls one of the transformers depending
 on the predicates. The transformer at array location 0 is called if the
 predicate at array location 0 returned true. Each predicate is evaluated
 until one returns true. If no predicates evaluate to true, the default
 transformer is called. If the default transformer is null, null is returned.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>I</code> - the input type</dd><dd><code>O</code> - the output type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>predicates</code> - an array of predicates to check</dd><dd><code>transformers</code> - an array of transformers to call</dd><dd><code>defaultTransformer</code> - the default to call if no predicate matches, null means return null</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the either array is null or empty</dd>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if any element in the arrays is null</dd>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the arrays are different sizes</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/SwitchTransformer.html" title="class in org.apache.commons.collections4.functors"><code>SwitchTransformer</code></a></dd></dl>
</li>
</ul>
<a name="switchTransformer(java.util.Map)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>switchTransformer</h4>
<pre>public static&nbsp;&lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;&nbsp;switchTransformer(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;I&gt;,<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;&gt;&nbsp;predicatesAndTransformers)</pre>
<div class="block">Create a new Transformer that calls one of the transformers depending
 on the predicates.
 <p>
 The Map consists of Predicate keys and Transformer values. A transformer
 is called if its matching predicate returns true. Each predicate is evaluated
 until one returns true. If no predicates evaluate to true, the default
 transformer is called. The default transformer is set in the map with a
 null key. If no default transformer is set, null will be returned in a default
 case. The ordering is that of the iterator() method on the entryset collection
 of the map.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>I</code> - the input type</dd><dd><code>O</code> - the output type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>predicatesAndTransformers</code> - a map of predicates to transformers</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the map is null or empty</dd>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if any transformer in the map is null</dd>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</a></code> - if the map elements are of the wrong type</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/SwitchTransformer.html" title="class in org.apache.commons.collections4.functors"><code>SwitchTransformer</code></a></dd></dl>
</li>
</ul>
<a name="switchMapTransformer(java.util.Map)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>switchMapTransformer</h4>
<pre>public static&nbsp;&lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;&nbsp;switchMapTransformer(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;I,<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;&gt;&nbsp;objectsAndTransformers)</pre>
<div class="block">Create a new Transformer that uses the input object as a key to find the
 transformer to call.
 <p>
 The Map consists of object keys and Transformer values. A transformer
 is called if the input object equals the key. If there is no match, the
 default transformer is called. The default transformer is set in the map
 using a null key. If no default is set, null will be returned in a default case.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>I</code> - the input type</dd><dd><code>O</code> - the output type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>objectsAndTransformers</code> - a map of objects to transformers</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the map is null or empty</dd>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if any transformer in the map is null</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/SwitchTransformer.html" title="class in org.apache.commons.collections4.functors"><code>SwitchTransformer</code></a></dd></dl>
</li>
</ul>
<a name="instantiateTransformer()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>instantiateTransformer</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends T&gt;,T&gt;&nbsp;instantiateTransformer()</pre>
<div class="block">Gets a Transformer that expects an input Class object that it will instantiate.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - the output type</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/InstantiateTransformer.html" title="class in org.apache.commons.collections4.functors"><code>InstantiateTransformer</code></a></dd></dl>
</li>
</ul>
<a name="instantiateTransformer(java.lang.Class[], java.lang.Object[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>instantiateTransformer</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends T&gt;,T&gt;&nbsp;instantiateTransformer(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;[]&nbsp;paramTypes,
                                                           <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[]&nbsp;args)</pre>
<div class="block">Creates a Transformer that expects an input Class object that it will
 instantiate. The constructor used is determined by the arguments specified
 to this method.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - the output type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>paramTypes</code> - parameter types for the constructor, can be null</dd><dd><code>args</code> - the arguments to pass to the constructor, can be null</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the paramTypes and args don't match</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/InstantiateTransformer.html" title="class in org.apache.commons.collections4.functors"><code>InstantiateTransformer</code></a></dd></dl>
</li>
</ul>
<a name="mapTransformer(java.util.Map)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mapTransformer</h4>
<pre>public static&nbsp;&lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;&nbsp;mapTransformer(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;? super I,? extends O&gt;&nbsp;map)</pre>
<div class="block">Creates a Transformer that uses the passed in Map to transform the input
 object (as a simple lookup).</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>I</code> - the input type</dd><dd><code>O</code> - the output type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>map</code> - the map to use to transform the objects</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer, or a <a href="../../../../org/apache/commons/collections4/functors/ConstantTransformer.html#NULL_INSTANCE"><code>ConstantTransformer.NULL_INSTANCE</code></a> if the <code>map</code> is <code>null</code></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/MapTransformer.html" title="class in org.apache.commons.collections4.functors"><code>MapTransformer</code></a></dd></dl>
</li>
</ul>
<a name="invokerTransformer(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>invokerTransformer</h4>
<pre>public static&nbsp;&lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;&nbsp;invokerTransformer(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;methodName)</pre>
<div class="block">Gets a Transformer that invokes a method on the input object.
 The method must have no parameters. If the input object is null,
 null is returned.
 <p>
 For example, <code>TransformerUtils.invokerTransformer("getName");</code>
 will call the <code>getName/code> method on the input object to
 determine the transformer result.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>I</code> - the input type</dd><dd><code>O</code> - the output type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>methodName</code> - the method name to call on the input object, may not be null</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the methodName is null.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/InvokerTransformer.html" title="class in org.apache.commons.collections4.functors"><code>InvokerTransformer</code></a></dd></dl>
</li>
</ul>
<a name="invokerTransformer(java.lang.String, java.lang.Class[], java.lang.Object[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>invokerTransformer</h4>
<pre>public static&nbsp;&lt;I,O&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;I,O&gt;&nbsp;invokerTransformer(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;methodName,
                                        <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;[]&nbsp;paramTypes,
                                        <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[]&nbsp;args)</pre>
<div class="block">Gets a Transformer that invokes a method on the input object.
 The method parameters are specified. If the input object is <code>null</code>,
 <code>null</code> is returned.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>I</code> - the input type</dd><dd><code>O</code> - the output type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>methodName</code> - the name of the method</dd><dd><code>paramTypes</code> - the parameter types</dd><dd><code>args</code> - the arguments</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the method name is null or the paramTypes and args don't match</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/InvokerTransformer.html" title="class in org.apache.commons.collections4.functors"><code>InvokerTransformer</code></a></dd></dl>
</li>
</ul>
<a name="stringValueTransformer()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>stringValueTransformer</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;T,<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;stringValueTransformer()</pre>
<div class="block">Gets a transformer that returns a <code>java.lang.String</code>
 representation of the input object. This is achieved via the
 <code>toString</code> method, <code>null</code> returns 'null'.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - the input type</dd>
<dt><span class="strong">Returns:</span></dt><dd>the transformer</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/functors/StringValueTransformer.html" title="class in org.apache.commons.collections4.functors"><code>StringValueTransformer</code></a></dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/TransformerUtils.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/commons/collections4/Trie.html" title="interface in org.apache.commons.collections4"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/commons/collections4/TransformerUtils.html" target="_top">Frames</a></li>
<li><a href="TransformerUtils.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2001&#x2013;2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>
